﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <base href="<%=basePath %>">
    <title>申诉表单</title>
    <link href="<%=basePath %>attend/frame/images/skin.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>attend/css/tab.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>attend/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="<%=basePath %>attend/js/tab.js"></script>
	<script type="text/javascript">
		function reloadGo() {
			var txtCurrentPage = document.getElementById("txtCurrentPage").value;
			var type = "^\\d+$";
			var re = new RegExp(type);
			if (txtCurrentPage.match(re) == null) {
				document.getElementById("txtCurrentPage").value="";
				alert("请输入整数!");
				return;
			}
			window.location.href = "Accepts?pagerMethod=go&currentPage=" + txtCurrentPage;
		}
	</script>
	<script type="text/javascript">
		function excuteDel(){
			if(window.confirm("是否批准？")){
				return true;
			}else{
				return false;
			}
		}
	</script>
	<script language="javascript" src="<%=basePath %>attend/js/date.js"></script>
	<script type="text/javascript">
		var oCalendarChs = new PopupCalendar("oCalendarChs"); //初始化控件时,请给出实例名称:oCalendarChs
		oCalendarChs.weekDaySting = new Array("日", "一", "二", "三", "四", "五", "六");
		oCalendarChs.monthSting = new Array("一月", "二月", "三月", "四月", "五月", "六月",
				"七月", "八月", "九月", "十月", "十一月", "十二月");
		oCalendarChs.oBtnTodayTitle = "今天";
		oCalendarChs.oBtnCancelTitle = "取消";
		oCalendarChs.Init();
	</script>
</head> 
  
  <body>
   		<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="<%=basePath %>attend/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=basePath %>attend/frame/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">申诉表单</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=basePath %>attend/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=basePath %>attend/frame/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <!--    内嵌代码 Start-->
    <form action="Accepts?rid=${ui}" name="acc" method="post">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
	    <td height="30">
	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="30"><img src="<%=basePath %>attend/images/tab_03.gif" width="15" height="30" /></td>
	        <td background="<%=basePath %>attend/images/tab_05.gif" height="30" class="STYLE1" align="center" valign="middle">申诉日期：<input name="startTime" type="text" title="点击选择日期查询！" value="${startTime}" onClick="WdatePicker()">--<input name="endTime" type="text" title="点击选择日期查询！" value="${endTime}" onClick="WdatePicker()"><input name="submit" type="submit" value="查  询"></td>
	        </tr>
	    </table></td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_07.gif" width="14" height="30" /></td>
	  </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="9" background="<%=basePath %>attend/images/tab_12.gif">&nbsp;</td>
	        <td bgcolor="#f3ffe3">
        <!--内嵌Table Start-->
	       <table width="99%" align="center" border="0" cellspacing="1" cellpadding="0" bgcolor="#c0de98" onMouseOver="changeto()" onMouseOut="changeback()">
			  <tr>
                <th width="12%" height="26" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1">申 诉 人</th>
                <th width="16%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1">申诉时间</th>
                <th width="34%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1">申诉内容</th>
                <th width="15%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1">状 态</th>
                <th width="23%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1">操 作</th>
			  </tr>
			  <c:forEach items="${applis}" var="app">
              <tr>
	            <td height="25" bgcolor="#FFFFFF" align="center" class="STYLE1">${app.sendname}</td>
                <td bgcolor="#FFFFFF" align="center" class="STYLE1">${app.createtime}</td>
                <td bgcolor="#FFFFFF" class="STYLE1">
                <c:choose>
                  <c:when test="${fn:length(app.content)>15}">${fn:substring(app.content, 0, 15)}......</c:when>
                  <c:otherwise>${app.content}</c:otherwise>
    			</c:choose></td>
                <td bgcolor="#FFFFFF" align="center" class="STYLE1"><c:choose>
			    	<c:when test="${app.status==0}"><img src="<%=basePath%>attend/images/mail.png" alt="查看详细信息！"  width="16" height="16" border="0"><a href="<%=basePath%>attend/admin/showAccept.jsp?appID=${app.appid}&startTime=${startTime}&endTime=${endTime}&currentPage=${page.currentPage}" title="查看详细信息！">未查看</a></c:when>
			    	<c:otherwise><img src="<%=basePath%>attend/images/mail_open.png" alt="查看详细信息！" width="16" height="16" border="0"><a href="<%=basePath%>attend/admin/showAccept.jsp?appID=${app.appid}&startTime=${startTime}&endTime=${endTime}&currentPage=${page.currentPage}" title="查看详细信息！"><font color="red">已查看</font></a></c:otherwise>
			    </c:choose></td>
                <td bgcolor="#FFFFFF" align="center" class="STYLE1"><c:choose>
			    	<c:when test="${app.type==0}">[<a href="Approve?appID=${app.appid}&startTime=${startTime}&endTime=${endTime}&currentPage=${page.currentPage}&sta=1" onClick="return excuteDel()"><font color="Green">批准</font></a>]&nbsp;[<a href="Approve?appID=${app.appid}&startTime=${startTime}&endTime=${endTime}&currentPage=${page.currentPage}&sta=2"><font color="Green">驳回</font></a>]</c:when>
					<c:when test="${app.type==1}">已批准</c:when>
					<c:when test="${app.type==2}">已驳回</c:when>
			    </c:choose></td>
              </tr>
              </c:forEach>
		  </table>
<!-- 内嵌Table end-->
	        </td>
	        <td width="9" background="<%=basePath %>attend/images/tab_16.gif">&nbsp;</td>
	      </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="29"><img src="<%=basePath %>attend/images/tab_20.gif" width="15" height="29" /></td>
	        <td background="<%=basePath %>attend/images/tab_21.gif" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="25%" height="29" nowrap="nowrap">
                <span class="STYLE1">共<font color="#FF0000">${page.totalRows}</font>条纪录，当前第<font color="#0066FF">${page.currentPage}</font>/共<font color="#0066FF">${page.totalPages}</font>页，每页<font color="#FF0000">${page.pageSize}</font>条纪录</span></td>
	            <td width="75%" valign="top" class="STYLE1"><div align="right">
	              <table width="352" height="20" border="0" cellpadding="0" cellspacing="0">
	                <tr>
	                  <td width="62" height="22" valign="middle"><div align="right"><a href="Accepts?pagerMethod=first"><img src="<%=basePath %>attend/images/first.gif" width="37" height="15" border="0" /></a></div></td>
	                  <td width="50" height="22" valign="middle"><div align="right"><a href="Accepts?pagerMethod=previous&currentPage=${page.currentPage}"><img src="<%=basePath %>attend/images/back.gif" width="43" height="15" border="0" /></a></div></td>
	                  <td width="54" height="22" valign="middle"><div align="right"><a href="Accepts?pagerMethod=next&currentPage=${page.currentPage}"><img src="<%=basePath %>attend/images/next.gif" width="43" height="15" border="0" /></a></div></td>
	                  <td width="49" height="22" valign="middle"><div align="right"><a href="Accepts?pagerMethod=last"><img src="<%=basePath %>attend/images/last.gif" width="37" height="15" border="0" /></a></div></td>
	                  <td width="59" height="22" valign="middle"><div align="right" class="STYLE1">转到第</div></td>
	                  <td width="25" height="22" valign="middle" class="STYLE1">
		                  <span class="STYLE1">
		                  	<input id="txtCurrentPage" type="text" title="请输入整数哦！" style="height:18px; width:30px;" size="5" />
		                  </span>
	                  </td>
	                  <td width="23" height="22" valign="middle" class="STYLE1">页</td>
	                  <td width="30" height="22" valign="middle"><a href="javascript:void(0);" onClick="reloadGo(sta='${Now}');"><img src="<%=basePath %>attend/images/go.gif" width="37" height="15" border="0" /></a></td>
	                </tr>
	              </table>
	            </div></td>
	          </tr>
	        </table></td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_22.gif" width="14" height="29" /></td>
	      </tr>
	    </table></td>
	  </tr>
	</table>
	</form>
	<!--内嵌代码 end-->
	</td>
    <td background="<%=basePath %>attend/frame/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=basePath %>attend/frame/images/buttom_bgs.gif"><img src="<%=basePath %>attend/frame/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
  </body>
</html>
